/*
 * @Author: yangzonglong
 * @Date: 2021-02-26 16:18:59
 * @version: v1.0.0
 * @Descripttion:
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-07-13 13:48:32
 * @Auditor:
 */
import React, { memo } from 'react';
import { Form } from 'antd';
import { controllerMap } from './../../../config';
import { ControlProps } from './../../../interface';
interface IProps {
  curControl?: ControlProps;
}

export default memo(({ curControl }: IProps) => {
  const Controller = controllerMap[curControl?.type!];

  return <Form layout="vertical">{Controller && <Controller />}</Form>;
});
